[][src]Crate tri_mesh

A triangle mesh data structure including basic operations.

Features

  • The main struct Mesh implements the half-edge mesh data structure for easy and efficient traversal
  • Half-edge walker to traverse the mesh
  • Iterators over primitives (vertices, half-edges, edges, faces)
  • Convenient connectivity functionality (e.g. vertices of a face, edge between two vertices)
  • Measures on vertices, edges and faces (e.g. position of vertex, area of face)
  • Bounding box functionality (e.g. constructing the axis aligned bounding box)
  • Edit functionality (e.g. split edge, collapse edge, flip edge)
  • Quality functionality (e.g. flip edges recursively to improve triangle quality, collapse small faces)
  • Orientation functionality (e.g. flip orientation of all faces)
  • Transformations affecting the vertex positions (e.g. moving a single vertex or rotate the entire mesh)
  • Intersection functionality (e.g. face/ray intersection, edge/point intersection)
  • Merge used for merging of entire meshes (e.g. append one mesh to another or merge overlapping primitives in a mesh)
  • Split functionality (e.g. clone a subset of a mesh or split two meshes at their intersection)
  • Export functionality (methods for extracting raw float buffers which can be used for visualisation)
  • And more..

All functionality is implemented as methods on the Mesh struct, so take a look at that rather long list of methods for a complete overview. Also, to construct a new mesh, use the Mesh builder.

Re-exports

pub use crate::mesh_builder::MeshBuilder;

Modules

mesh

Module containing the Mesh definition and functionality.

mesh_builder

Module containing MeshBuilder which has functionality to build a new Mesh instance.

prelude

Contains the most common functionality used in tri-mesh. By global importing this module, you can avoid the need to import each trait individually, while still being selective about what types you import.